package test.dao;

import java.util.List;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import toubiao.dao.business.ContractDaoI;
import toubiao.domain.po.business.PoContract;
import toubiao.domain.vo.business.ContractGrid;
import toubiao.utils.old.ProUtilPoVoConvert;
import utils.UtilJackson;

public class ContractDao extends BaseTest{

	@Autowired
	private ContractDaoI contractDao;
	
	@Test
	public void getAllAndConvert2GridVo(){
		String hql="from PoContract";
		List<PoContract> list=contractDao.find(hql);
		logger.info(list.size()+"");
		List<ContractGrid> contractGridList=ProUtilPoVoConvert.getVoListOfContractGrid(list);
		String json=UtilJackson.me().object2Json(contractGridList);
		logger.info(json);
	}
}
